﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="DutyInfoUpdForm.aspx.cs" Inherits="App_Input_DutyInfoUpdForm" Title="值班登记" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<script type="text/javascript" >
function SetDateTime()
{
var s_date = window.document.getElementById('<%=txtDutyDate.ClientID%>').value;

if (s_date=="") 
{ 
return; 
} 
else 
{ 
    re=/^20\d{2}\/((0[1-9]{1})|(1[0-2]{1}))\/((0[1-9]{1})|([1-2]{1}[0-9]{1})|(3[0-1]{1}))$/; 
    if (s_date.match(re)==null) 
    { 
    return; 
    } 
}


 window.document.getElementById('<%=hidDay.ClientID%>').value = s_date;
}


function restDateTimeS()
{
var today = new Date(); 
var day=today.getDate();
var month=today.getMonth()+1;
if(day<10)
{
day="0"+day;
}
if(month<10)
{
month="0"+month;
}
Todaynow = today.getFullYear() + "/" + month + "/" + day; 

window.document.getElementById('<%=hidDay.ClientID%>').value = Todaynow;
}
function work()
{
var i=window.document.getElementById('<%=ddlType.ClientID%>').selectedIndex;

var text = window.document.getElementById('<%=ddlType.ClientID%>').options[i].text;
     return confirm("是否上"+text+"班？");
}
</script>
    <div id="container" >
        <div id="title">
            <ul>
                <li id="Li1">
                    <asp:LinkButton ID="LinkButton1" CommandName="btn0" runat="server" CssClass="selectli" OnCommand="lnkBtn_Command" OnClientClick="return false"><span class="selectspan">值班登记</span></asp:LinkButton>
                </li>
                <li id="Li2">
                    <asp:LinkButton ID="LinkButton2" CommandName="btn1" runat="server" OnCommand="lnkBtn_Command"><span>工作任务</span></asp:LinkButton>
                </li>
                <li id="Li3">
                    <asp:LinkButton ID="LinkButton3" CommandName="btn2" runat="server" OnCommand="lnkBtn_Command"  ><span>移交任务</span></asp:LinkButton>
                </li>
            </ul>
        </div>
            </div>
 <cc1:ComValidator ID="ComValidator1" runat="server" CheckItems-Capacity="32" ForeColor="Red" Visible="false">
       <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtDutyDate">
                <cc1:ComAbsParamsAttribute Parameter="工作日期" />
            </cc1:CheckRequiredAttribute>
            <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtDutyDate">
                <cc1:ComAbsParamsAttribute Parameter="工作日期" />
            </cc1:CheckDateAttribute>
      </cc1:ComValidator> 
        <div id="content" class="content1">
            <table border="0" class="table_border_line">
                <tr>
                    <td align="left">
                        <script language="javascript" type="text/javascript">
                            (new TitleBar('SearchBar', '检索条件')).showBar();
                        </script>
                    </td>
                </tr>
            </table>
            <table class="table_border_line" style="background: ffffff">
                <tr>
                    <td style="width: 16px" class="">
                        &nbsp;
                    </td>
                    <td class="" style="width: 128px; height: 26px">
                        工作日期
                    </td>
                    <td class="">
                        <asp:TextBox ID="txtDutyDate" runat="server" MaxLength="10" Width="96px" onfocus="new Calendar().show(this);"/>
                        &nbsp; &nbsp;
                        <asp:Button ID="btnSearch" runat="server" Text=" 检索 " CssClass="button" OnClick="btnSearch_Click"  />&nbsp;
                        &nbsp;<asp:Button ID="btnCancel" runat="server" Text=" 取消 " CssClass="button" OnClick="btnCancel_Click"  />
                    </td>
                </tr>
            </table>
            
            <p>&nbsp;</p>

            <table border="0" class="table_border_line">
                <tr>
                    <td align="left" style="height: 15px">
                        <script language="javascript" type="text/javascript">
                            (new TitleBar('DutyTableBar', '值班情况表')).showBar();
                        </script>
                    </td>
                </tr>
            </table>
            <asp:Table ID="TblSchedule1" runat="server" CssClass="GridView_table">                    
            </asp:Table>
             <hr style="border-top: 1px solid #F26322; border-style: solid" />
              <asp:Table ID="TblSchedule2" runat="server" CssClass="GridView_table">                    
            </asp:Table>

            <p>&nbsp;</p>

            <table border="0" class="table_border_line">
                <tr>
                    <td align="left">
                        <script language="javascript" type="text/javascript">
                            (new TitleBar('DutyInfoBar', '值班情况登记')).showBar();
                        </script>
                    </td>
                </tr>
            </table>
            <table class="table_border_line" style="background: ffffff">
            <tr>
                    <td style="width: 16px" class="">
                        &nbsp;
                    </td>
                    <td class="" style="width: 128px; height: 26px">
                        当班日期
                    </td>
                    <td class="">
                        <asp:Label ID="labDutyDate" runat="server" Text="--"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16px" class="">
                        &nbsp;
                    </td>
                    <td class="" style="width: 128px; height: 26px">
                        上班时间
                    </td>
                    <td class="">
                       <asp:Label ID="labOnWorkDate" runat="server" Text="--"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16px" class="">
                        &nbsp;
                    </td>
                    <td class="" style="width: 128px; height: 26px">
                        下班时间
                    </td>
                    <td class="">
                       <asp:Label ID="labOffWorkDate" runat="server" Text="--"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16px" class="">
                        &nbsp;
                    </td>
                    <td class="" style="width: 128px; height: 26px">
                        排班类型
                    </td>
                    <td class="">
                        <asp:DropDownList ID="ddlType" runat="server" Width="120" DataTextField="Content" DataValueField="DictNo">
                           
                        </asp:DropDownList>
                        <asp:Label ID="labDutyType" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
            </table>
            
            <p>&nbsp;</p>
            <p align="center">
            <asp:Button ID="btnOnWork" runat="server" Text="  上 班  " CssClass="button" Enabled="False" OnClick="btnOnWork_Click"  OnClientClick="return work()"/>
            &nbsp;&nbsp;
            <asp:Button ID="btnOffWork" runat="server" Text="  下 班  " CssClass="button" Enabled="False" OnClick="btnOffWork_Click" OnClientClick="return confirm('是否下班？')"/>
           
            </p>
        </div>
<asp:HiddenField ID="hidItemId" runat="server" />
                <asp:HiddenField ID="hidCommond" runat="server" />
                <asp:HiddenField ID="hidDay" runat="server" />
                <asp:HiddenField ID="hidEmpId" runat="server" />

</asp:Content>

